package com.huilian.iotbox.admin.wap.dao;

import com.huilian.iotbox.data.dto.MerchantDto;
import com.huilian.iotbox.data.po.Merchant;
import com.huilian.iotbox.data.vo.MerchantVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 谢洛涛
 * @date 2021/3/23 13:14
 */
@Mapper
public interface MerchantDao {
    Integer addMerchant(Merchant merchant);

    Integer updateMerchant(Merchant merchant);

    MerchantVo findMerchantByOutTradeNo(Merchant merchant);

    Merchant findMerchant(MerchantDto merchantDto);

    List<MerchantVo> findMerchantListByUserId(MerchantDto merchantDto);

    Merchant findMerchantByMerchantId(@Param("merchantId") String merchantId);

    MerchantVo findMerchantByOutTradeNoAndPayCompanyCode(MerchantDto merchantDto);

    List<Merchant> findMerchantList();

    /**
     * 查询商户号是否存在
     *
     * @return
     */
    MerchantVo findByUserIdAndMerchantId(MerchantDto merchantDto);

    List<MerchantVo> findMerchantSubAccountByUserId(Merchant merchant);
}
